/*
 * @Author: your name
 * @Date: 2020-08-19 16:39:14
 * @LastEditTime: 2020-08-27 09:34:10
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \youlunzx\js\index.js
 */
$(function() {
    $('.search-input').on('focus', function() {
        $('.search-input').css('outline', 'none')
    })
    $('.main-menus li').hover(function(e) {
        $(this).children('ul').show()
    }, function(e) {
        $(this).children('ul').hide()
    });
    // $('.core').on('click', function() {
    //     console.log($(this).text(), 'url')
    //         // var url = window.location.href.split("/")
    //         // url[url.length - 1] = 'core.html'
    //         // window.location.href = url.join("/")
    // })
})

function goto(file, index, sort) {
    $('.table-box').show()
    $('.text-content').hide()
    $('.subMenus-text').hide()
    var url = window.location.href.split("/")
    console.log(sort);
    if (sort == 0 || sort) {
        url[url.length - 1] = file + '.html' + "?index=" + index + '&sort=' + sort
    } else {
        url[url.length - 1] = file + '.html' + "?index=" + index
    }
    console.log(index, 'index')
    if (!index) {
        url[url.length - 1] = file + '.html'
    }
    window.location.href = url.join("/")
}